package com.easy.query.test.entity.school.proxy;

import com.easy.query.core.expression.parser.core.available.TableAvailable;
import com.easy.query.core.proxy.AbstractProxyEntity;
import com.easy.query.core.proxy.SQLColumn;
import com.easy.query.core.proxy.SQLSelectAsExpression;
import com.easy.query.core.proxy.fetcher.AbstractFetcher;
import com.easy.query.core.proxy.core.EntitySQLContext;
import com.easy.query.test.entity.school.SchoolStudentAddress;
import com.easy.query.core.proxy.columns.types.SQLStringTypeColumn;
import com.easy.query.core.proxy.columns.SQLNavigateColumn;
import com.easy.query.core.proxy.columns.types.SQLAnyTypeColumn;

/**
 * this file automatically generated by easy-query, don't modify it
 * 当前文件是easy-query自动生成的请不要随意修改
 * 如果出现属性冲突请使用@ProxyProperty进行重命名
 *
 * @author easy-query
 */
public class SchoolStudentAddressProxy extends AbstractProxyEntity<SchoolStudentAddressProxy, SchoolStudentAddress> {

    private static final Class<SchoolStudentAddress> entityClass = SchoolStudentAddress.class;

    public static final SchoolStudentAddressProxy TABLE = createTable().createEmpty();

    public static SchoolStudentAddressProxy createTable() {
        return new SchoolStudentAddressProxy();
    }

    public SchoolStudentAddressProxy() {
    }

    /**
     * {@link SchoolStudentAddress#getId}
     */
    public SQLStringTypeColumn<SchoolStudentAddressProxy> id() {
        return getStringTypeColumn("id");
    }

    /**
     * {@link SchoolStudentAddress#getStudentId}
     */
    public SQLStringTypeColumn<SchoolStudentAddressProxy> studentId() {
        return getStringTypeColumn("studentId");
    }

    /**
     * {@link SchoolStudentAddress#getAddress}
     */
    public SQLStringTypeColumn<SchoolStudentAddressProxy> address() {
        return getStringTypeColumn("address");
    }

    /**
     * {@link SchoolStudentAddress#getSchoolStudent}
     */
    public com.easy.query.test.entity.school.proxy.SchoolStudentProxy schoolStudent() {
        return getNavigate("schoolStudent", new com.easy.query.test.entity.school.proxy.SchoolStudentProxy());
    }


    @Override
    public Class<SchoolStudentAddress> getEntityClass() {
        return entityClass;
    }


    /**
     * 数据库列的简单获取
     *
     * @return
     */
    public SchoolStudentAddressProxyFetcher FETCHER = new SchoolStudentAddressProxyFetcher(this, null, SQLSelectAsExpression.empty);


    public static class SchoolStudentAddressProxyFetcher extends AbstractFetcher<SchoolStudentAddressProxy, SchoolStudentAddress, SchoolStudentAddressProxyFetcher> {

        public SchoolStudentAddressProxyFetcher(SchoolStudentAddressProxy proxy, SchoolStudentAddressProxyFetcher prev, SQLSelectAsExpression sqlSelectAsExpression) {
            super(proxy, prev, sqlSelectAsExpression);
        }


        /**
         * {@link SchoolStudentAddress#getId}
         */
        public SchoolStudentAddressProxyFetcher id() {
            return add(getProxy().id());
        }

        /**
         * {@link SchoolStudentAddress#getStudentId}
         */
        public SchoolStudentAddressProxyFetcher studentId() {
            return add(getProxy().studentId());
        }

        /**
         * {@link SchoolStudentAddress#getAddress}
         */
        public SchoolStudentAddressProxyFetcher address() {
            return add(getProxy().address());
        }


        @Override
        protected SchoolStudentAddressProxyFetcher createFetcher(SchoolStudentAddressProxy cp, AbstractFetcher<SchoolStudentAddressProxy, SchoolStudentAddress, SchoolStudentAddressProxyFetcher> prev, SQLSelectAsExpression sqlSelectExpression) {
            return new SchoolStudentAddressProxyFetcher(cp, this, sqlSelectExpression);
        }
    }

}
